package com.link.base.base.email.emailutils;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

//向邮件服务器提交认证信息
public class MySendMailAuthenticator extends Authenticator {
    String username = "";
    String pas = "";

    public MySendMailAuthenticator(String user, String pass) {
        this.username = user;
        this.pas = pass;
    }

    @Override
    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(username, pas);
    }
}
